<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<#include "/jspgou_sys/head.html"/>
<script type="text/javascript">
function optSaveTagName() {
	var f = document.getElementById('tableForm');
	f.action="o_update_tag_names.do";
	f.submit();
}
function optDelete() {
	if(Pn.checkedCount('ids')<=0) {
		alert("<@s.m 'error.checkRecord'/>");
		return;
	}
	if(!confirm("<@s.m 'global.confirm.delete'/>")) {
		return;
	}
	var f = document.getElementById('tableForm');
	f.action="o_delete.do";
	f.submit();
}
$(function() {
	$("#jvForm").validate();
});
</script>
</head>
<body>
<div class="body-box">
<div class="rhead">
	<div class="rpos"><@s.m "global.position"/>: <@s.m "shop.function.product"/> - <@s.m "productTag.function"/> - <@s.m "global.list"/></div>
	<div class="clear"></div>
</div>
<form id="jvForm" action="o_save.do" method="post" style="padding-top:5px">
<input type="text" name="name" class="required" maxlength="100"/> &nbsp;
<input type="submit" value="<@s.m "productTag.saveTag"/>"/>
</form>
<form id="tableForm" method="post">
<input type="hidden" name="pageNo" value="${pageNo!}"/>
<@p.table value=list;productTag,i,has_next><#rt/>
	<@p.column title="<input type='checkbox' onclick='Pn.checkbox(\"ids\",this.checked)'/>" width="20">
		<input type='checkbox' name='ids' value='${productTag.id}'/><#t/>
	</@p.column><#t/>
	<@p.column title="ID">${productTag.id}</@p.column><#t/>
	<@p.column code="productTag.name" align="center"><input type="text" name="tagNames" value="${productTag.name}"/><input type="hidden" name="wids" value="${productTag.id}"/></@p.column><#t/>
	<@p.column code="productTag.count">${productTag.count}</@p.column><#t/>
	<@p.column code="global.operate" align="center">
		<a href="o_delete.do?ids=${productTag.id}" onclick="if(!confirm('<@s.m "global.confirm.delete"/>')) {return false;}"><@s.m "global.delete"/></a><#t/>
	</@p.column><#t/>
</@p.table>
<div>
	<input type="button" value="<@s.m "global.delete"/>" onclick="optDelete();"/>
&nbsp; <input type="button" value="<@s.m "productTag.saveTagName"/>" onclick="optSaveTagName();"/>	
</div>
</form>
</div>
<#include "/common/alert_message.html"/>
</body>
</html>